echo compile frontend/
cd frontend
npm run build
cd ..

echo compile backend
cd backend
go build -o backend.bin
cd ..

echo compile model service
cd model/server
nuitka3 service.py
rm -rf service.build/
cd ..
cd ..

echo merge
rm -rf ./build
mkdir ./build
mkdir ./build/web/
mkdir ./build/model/
mkdir ./build/model/checkpoints/

cp ./backend/backend.bin ./build/web/
cp ./backend/config_default.json ./build/web/config.json

cp -r ./frontend/dist ./build/web/

cp ./model/server/service.bin ./build/model/
cp -r ./model/server/checkpoints/* ./build/model/checkpoints/
